gen suffrageyear = .

replace suffrageyear = year-1920 if countryid==1
replace suffrageyear = year-1947 if countryid==2
replace suffrageyear = year-1921 if countryid==3
replace suffrageyear = year-1962 if countryid==4
replace suffrageyear = year-1918 if countryid==5
replace suffrageyear = year-1972 if countryid==6
replace suffrageyear = year-1919 if countryid==7
replace suffrageyear = year-1948 if countryid==8
replace suffrageyear = year-1956 if countryid==9
replace suffrageyear = year-1938 if countryid==10
replace suffrageyear = .         if countryid==11
replace suffrageyear = year-1932 if countryid==12
replace suffrageyear = year-1944 if countryid==13
replace suffrageyear = year-1961 if countryid==14
replace suffrageyear = year-1960 if countryid==15
replace suffrageyear = year-1975 if countryid==16
replace suffrageyear = year-1986 if countryid==17
replace suffrageyear = year-1949 if countryid==18
replace suffrageyear = year-1954 if countryid==19
replace suffrageyear = year-1956 if countryid==20
replace suffrageyear = year-1963 if countryid==21
replace suffrageyear = year-1949 if countryid==22
replace suffrageyear = year-1945 if countryid==23
replace suffrageyear = year-1960 if countryid==24
replace suffrageyear = year-1920 if countryid==25
replace suffrageyear = year-1915 if countryid==26
replace suffrageyear = year-1946 if countryid==27
replace suffrageyear = year-1942 if countryid==28
replace suffrageyear = .         if countryid==29
replace suffrageyear = year-1967 if countryid==30
replace suffrageyear = year-1939 if countryid==31
replace suffrageyear = year-1918 if countryid==32
replace suffrageyear = year-1955 if countryid==33
replace suffrageyear = year-1963 if countryid==34
replace suffrageyear = year-1906 if countryid==35
replace suffrageyear = year-1944 if countryid==36
replace suffrageyear = year-1960 if countryid==37
replace suffrageyear = year-1918 if countryid==38
replace suffrageyear = year-1918 if countryid==39
replace suffrageyear = year-1954 if countryid==40
replace suffrageyear = year-1952 if countryid==41
replace suffrageyear = year-1946 if countryid==42
replace suffrageyear = year-1977 if countryid==43
replace suffrageyear = year-1953 if countryid==44
replace suffrageyear = year-1950 if countryid==45
replace suffrageyear = year-1955 if countryid==46
replace suffrageyear = year-1918 if countryid==47
replace suffrageyear = year-1920 if countryid==48
replace suffrageyear = year-1950 if countryid==49
replace suffrageyear = year-1945 if countryid==50
replace suffrageyear = year-1928 if countryid==51
replace suffrageyear = year-1948 if countryid==52
replace suffrageyear = year-1945 if countryid==53
replace suffrageyear = year-1944 if countryid==54
replace suffrageyear = year-1945 if countryid==55
replace suffrageyear = year-1963 if countryid==56
replace suffrageyear = year-1918 if countryid==57
replace suffrageyear = year-1918 if countryid==58
replace suffrageyear = year-1952 if countryid==59
replace suffrageyear = year-1965 if countryid==60
replace suffrageyear = year-1946 if countryid==61
replace suffrageyear = year-1918 if countryid==62
replace suffrageyear = year-1946 if countryid==63
replace suffrageyear = year-1959 if countryid==64
replace suffrageyear = year-1961 if countryid==65
replace suffrageyear = year-1957 if countryid==66
replace suffrageyear = year-1956 if countryid==67
replace suffrageyear = year-1956 if countryid==68
replace suffrageyear = year-1947 if countryid==69
replace suffrageyear = year-1978 if countryid==70
replace suffrageyear = year-1924 if countryid==71
replace suffrageyear = year-1946 if countryid==72
replace suffrageyear = year-1975 if countryid==73
replace suffrageyear = year-1989 if countryid==74
replace suffrageyear = year-1951 if countryid==75
replace suffrageyear = year-1919 if countryid==76
replace suffrageyear = year-1893 if countryid==77
replace suffrageyear = year-1955 if countryid==78
replace suffrageyear = year-1948 if countryid==79
replace suffrageyear = year-1978 if countryid==80
replace suffrageyear = year-1913 if countryid==81
replace suffrageyear = year-1947 if countryid==82
replace suffrageyear = year-1946 if countryid==83
replace suffrageyear = year-1964 if countryid==84
replace suffrageyear = year-1961 if countryid==85
replace suffrageyear = year-1955 if countryid==86
replace suffrageyear = year-1937 if countryid==87
replace suffrageyear = year-1918 if countryid==88
replace suffrageyear = year-1976 if countryid==89
replace suffrageyear = year-1946 if countryid==90
replace suffrageyear = year-1918 if countryid==91
replace suffrageyear = year-1945 if countryid==92
replace suffrageyear = year-1946 if countryid==93
replace suffrageyear = year-1961 if countryid==94
replace suffrageyear = year-1920 if countryid==95
replace suffrageyear = year-1945 if countryid==96
replace suffrageyear = year-1974 if countryid==97
replace suffrageyear = year-1930 if countryid==98
replace suffrageyear = year-1948 if countryid==99
replace suffrageyear = year-1931 if countryid==100
replace suffrageyear = year-1931 if countryid==101
replace suffrageyear = year-1921 if countryid==102
replace suffrageyear = year-1971 if countryid==103
replace suffrageyear = year-1949 if countryid==104
replace suffrageyear = year-1932 if countryid==105
replace suffrageyear = year-1946 if countryid==106
replace suffrageyear = year-1930 if countryid==107
replace suffrageyear = year-1919 if countryid==108
replace suffrageyear = year-1928 if countryid==109
replace suffrageyear = year-1920 if countryid==110
replace suffrageyear = year-1932 if countryid==111
replace suffrageyear = year-1946 if countryid==112
replace suffrageyear = year-1946 if countryid==113
replace suffrageyear = year-1962 if countryid==115